home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / sh-utils.12 / sh-utils / sh-utils-1.12 / Makefile.in < prev    next >
Encoding:
Makefile  |  1994-11-04  |  4.0 KB  |  132 lines

  1. # Master Makefile for the GNU shell utilities.
  2. # Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
  3.  
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2, or (at your option)
  7. # any later version.
  8.  
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. # GNU General Public License for more details.
  13.  
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program; if not, write to the Free Software
  16. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18. # This directory's subdirectories are mostly independent; you can cd
  19. # into them and run `make' without going through this Makefile.
  20. # To change the values of `make' variables: instead of editing Makefiles,
  21. # (1) if the variable is set in `config.status', edit `config.status'
  22. #     (which will cause the Makefiles to be regenerated when you run `make');
  23. # (2) otherwise, pass the desired values on the `make' command line.
  24.  
  25. srcdir = @srcdir@
  26. VPATH = @srcdir@
  27. @SET_MAKE@
  28.  
  29. SHELL = /bin/sh
  30.  
  31. DISTFILES = COPYING COPYING.LIB ChangeLog Makefile.in README INSTALL \
  32. NEWS configure configure.in config.h.in mkinstalldirs install-sh \
  33. stamp-h.in acconfig.h
  34.  
  35. # Redundant stuff for making only selected programs.
  36. PROGS = basename date dirname echo env expr false groups hostname id logname \
  37. pathchk printenv printf pwd sleep tee test true tty users who whoami \
  38. yes @PROGS@
  39.  
  40. # Subdirectories to run make in for the primary targets.
  41. SUBDIRS = lib src man doc
  42.  
  43. .SUFFIXES:
  44.  
  45. all install uninstall: config.h Makefile
  46.     for subdir in $(SUBDIRS); do \
  47.       echo making $@ in $$subdir; \
  48.       (cd $$subdir && $(MAKE) $@) || exit 1; \
  49.     done
  50.  
  51. info dvi:
  52.     cd doc && $(MAKE) $@
  53.  
  54. check:
  55. installcheck:
  56.  
  57. $(PROGS) su:
  58.     cd lib && $(MAKE) all
  59.     cd src && $(MAKE) $@
  60.  
  61. mostlyclean: mostlyclean-recursive mostlyclean-local
  62.  
  63. clean: clean-recursive clean-local
  64.  
  65. distclean: distclean-recursive distclean-local
  66.     rm config.status
  67.  
  68. realclean: realclean-recursive realclean-local
  69.     rm config.status
  70.  
  71. TAGS clean-recursive distclean-recursive \
  72.         mostlyclean-recursive realclean-recursive:
  73.     for subdir in $(SUBDIRS); do \
  74.       target=`echo $@|sed 's/-recursive//'`; \
  75.       echo making $$target in $$subdir; \
  76.       (cd $$subdir && $(MAKE) $$target) || exit 1; \
  77.     done
  78.  
  79. mostlyclean-local:
  80.  
  81. clean-local: mostlyclean-local
  82.  
  83. distclean-local: clean-local
  84.     rm -f Makefile config.cache config.h config.log stamp-h distname
  85.  
  86. realclean-local: distclean-local
  87.  
  88. distname: src/version.c
  89.     echo sh-utils-`sed -e '/version_string/!d' \
  90.         -e 's/[^0-9.]*\([0-9.a-z]*\).*/\1/' -e q src/version.c` > $@-tmp
  91.     mv $@-tmp $@
  92.  
  93. distdir = `cat distname`
  94. dist: $(DISTFILES) distname
  95.     rm -rf $(distdir)
  96.     mkdir $(distdir)
  97.     for file in $(DISTFILES); do \
  98.       ln $$file $(distdir) \
  99.         || { echo copying $$file instead; cp -p $$file $(distdir);}; \
  100.     done
  101.     for subdir in $(SUBDIRS); do \
  102.       mkdir $(distdir)/$$subdir || exit 1; \
  103.       (cd $$subdir && $(MAKE) $@) || exit 1; \
  104.     done
  105.     tar --gzip -chvf $(distdir).tar.gz $(distdir)
  106.     rm -rf $(distdir) distname
  107.  
  108. # For the justification of the following Makefile rules, see node
  109. # `Automatic Remaking' in GNU Autoconf documentation.
  110.  
  111. Makefile: config.status Makefile.in
  112.     CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
  113.  
  114. config.h: stamp-h
  115. stamp-h: config.status $(srcdir)/config.h.in
  116.     CONFIG_FILES= CONFIG_HEADERS=config.h ./config.status
  117.  
  118. config.status: configure
  119.     ./config.status --recheck
  120. configure: configure.in
  121.     cd $(srcdir) && autoconf
  122. config.h.in: stamp-h.in
  123. stamp-h.in: configure.in
  124.     cd $(srcdir) && autoheader
  125. # Use echo instead of date to avoid spurious conflicts for
  126. # people who use CVS, since stamp-h.in is distributed.
  127.     echo > $(srcdir)/$@
  128.  
  129. # Tell versions [3.59,3.63) of GNU make not to export all variables.
  130. # Otherwise a system limit (for SysV at least) may be exceeded.
  131. .NOEXPORT:
  132.